edit_{$taxonomy}
Action HookDescription
Fires after a term in a specific taxonomy has been updated, but before the term cache has been cleaned. The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. Possible hook names include: - `edit_category` - `edit_post_tag`Hook Information
File Location |
wp-includes/taxonomy.php
View on GitHub
|
Hook Type | Action |
Line Number | 3442 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$term_id
|
Term ID. |
int
|
$tt_id
|
Term taxonomy ID. |
array
|
$args
|
Arguments passed to wp_update_term(). |
Usage Examples
Basic Usage
<?php
// Hook into edit_{$taxonomy}
add_action('edit_{$taxonomy}', 'my_custom_function', 10, 3);
function my_custom_function($term_id, $tt_id, $args) {
// Your custom code here
}
Source Code Context
wp-includes/taxonomy.php:3442
- How this hook is used in WordPress core
<?php
3437 *
3438 * @param int $term_id Term ID.
3439 * @param int $tt_id Term taxonomy ID.
3440 * @param array $args Arguments passed to wp_update_term().
3441 */
3442 do_action( "edit_{$taxonomy}", $term_id, $tt_id, $args );
3443
3444 /** This filter is documented in wp-includes/taxonomy.php */
3445 $term_id = apply_filters( 'term_id_filter', $term_id, $tt_id );
3446
3447 clean_term_cache( $term_id, $taxonomy );
PHP Documentation
<?php
/**
* Fires after a term in a specific taxonomy has been updated, but before the term
* cache has been cleaned.
*
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* Possible hook names include:
*
* - `edit_category`
* - `edit_post_tag`
*
* @since 2.3.0
* @since 6.1.0 The `$args` parameter was added.
*
* @param int $term_id Term ID.
* @param int $tt_id Term taxonomy ID.
* @param array $args Arguments passed to wp_update_term().
*/
Quick Info
- Hook Type: Action
- Parameters: 3
- File: wp-includes/taxonomy.php
Related Hooks
Related hooks will be displayed here in future updates.